Add Cloud Run OpenTelemetry worker sample - #792
Draft
seanbollin wants to merge 8 commits into
Draft
seanbollin wants to merge 8 commits into
seanbollin wants to merge 8 commits into
Conversation
Adds cloud-run-worker/: a long-running Temporal worker for Google Cloud Run worker pools that uses the temporal-gcp-cloud-run CloudRunOpenTelemetryPlugin to export Core metrics and traces over OTLP/gRPC to a local OpenTelemetry Collector sidecar (worker, greeting workflow/activities, collector-config.yaml, worker-pool.yaml, Dockerfile, README). Note: the SDK module temporal-gcp-cloud-run is not yet released, so the sample resolves it via the existing -PtemporalSdkPath composite build against a local sdk-java checkout. Bump javaSDKVersion to the release that ships the module before this is marked ready. Co-authored-by: Edward Amsden <edward.amsden@temporal.io> Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the sample from cloud-run-worker/ to gcp/cloud-run/opentelemetry/ so the layout mirrors the merged SDK module (io.temporal:temporal-gcp-cloud-run, package io.temporal.gcp.cloudrun) and matches the other SDKs' Cloud Run samples, leaving room for additional Cloud Run samples (e.g. worker ID) under gcp/cloud-run/. - Gradle project path :cloud-run-worker -> :gcp:cloud-run:opentelemetry (settings.gradle), with applicationName pinned to cloud-run-worker so the installDist launcher name (and the Dockerfile) stay stable. - Java package io.temporal.samples.cloudrun -> io.temporal.samples.gcp.cloudrun, mirroring the SDK's io.temporal.gcp.cloudrun. - Update the Dockerfile gradle task/paths, build.gradle mainClass, and the sample and root README paths. Verified with the composite build against a local sdk-java checkout: `:gcp:cloud-run:opentelemetry:test` and `:installDist` both pass. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
Move the sample's Java sources into the io.temporal.samples.gcp.cloudrun.opentelemetry package (mirroring the gcp/cloud-run/opentelemetry module path and the sibling workerid sample), and point the dependency and imports at the renamed temporal-gcp-cloud-run-opentelemetry SDK plugin. Co-Authored-By: Claude Opus 4.8 <noreply@anthropic.com>
seanbollin
force-pushed
the
gcp-cloud-run-otel
branch
from
September 18, 2026 17:32
1f26666 to
0e52d7b
Compare
This file contains hidden or bidirectional Unicode text that may be interpreted or compiled differently than what appears below. To review, open the file in an editor that reveals hidden Unicode characters.
Learn more about bidirectional Unicode characters
Sign up for free
to join this conversation on GitHub.
Already have an account?
Sign in to comment
Add this suggestion to a batch that can be applied as a single commit.This suggestion is invalid because no changes were made to the code.Suggestions cannot be applied while the pull request is closed.Suggestions cannot be applied while viewing a subset of changes.Only one suggestion per line can be applied in a batch.Add this suggestion to a batch that can be applied as a single commit.Applying suggestions on deleted lines is not supported.You must change the existing code in this line in order to create a valid suggestion.Outdated suggestions cannot be applied.This suggestion has been applied or marked resolved.Suggestions cannot be applied from pending reviews.Suggestions cannot be applied on multi-line comments.Suggestions cannot be applied while the pull request is queued to merge.Suggestion cannot be applied right now. Please check back later.
Runs a Temporal Worker on a Google Cloud Run worker pool using the Cloud Run OpenTelemetry plugin (
io.temporal:temporal-gcp-cloud-run-opentelemetry), exporting SDK metrics and traces over OTLP to a Google-Built OpenTelemetry Collector sidecar.Build locally:
./gradlew -PtemporalSdkPath=/path/to/sdk-java :gcp:cloud-run:opentelemetry:build. Deploy:gcloud run worker-pools replace gcp/cloud-run/opentelemetry/worker-pool.yaml --project="$PROJECT_ID".The module is unreleased, so the sample builds against a local SDK checkout via composite build (default
../sdk-java); CI stays red until it ships.